package com.xuehu.cloud.controller;

import com.xuehu.cloud.entities.CommonResult;
import com.xuehu.cloud.entities.Payment;
import com.xuehu.cloud.service.PaymentFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author guoweia@cslc.com.cn
 * @createTime 2020/11/30 19:51
 * @description
 */
@RestController
public class OrderController {

    @Resource
    PaymentFeignService paymentFeignService;

    @GetMapping("/order/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id){
        return paymentFeignService.getPaymentById(id);
    }

    @GetMapping("/order/get/timeout")
    public String queryTimeout() {
        return paymentFeignService.queryTimeout();
    }
}
